<!--
 * @FilePath     : /study_code/layui/15-15.html
 * @Description  : direction 配置下拉选展开的方向 自动下拉方向
 * @Date         : 2025-04-09 15:50:51
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-09 16:11:38
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
    <style>
      body {
        height: 1600px;
        overflow: auto;
      }
      .container {
        width: 200px;
        height: 100px;
        border: 1px solid #333;
        padding-top: 1200px;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div id="demo1" class="xm-select-demo"></div>
    </div>

    <script src="/xm-select/dist/xm-select.js"></script>
    <script>
      var demo1 = xmSelect.render({
        el: '.xm-select-demo',
        data: [
          { name: '张三', value: 1 },
          { name: '李四', value: 2 },
          { name: '王五', value: 3 },
        ],

        //
        direction: 'auto',
        /*
        验证：当屏幕下面没有足够空间显示下拉选时，会自动展示在上面。
        */
      })
    </script>
  </body>
</html>
